﻿@using System.Configuration
@using ZBJF.Warranty.Common.Common
@using ZBJF.Warranty.WebProvider
@model  ZBJF.Warranty.Model.SystemUser
@{

    ViewBag.Title = "中保金服登录页";
    Layout = null;
}
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <title>@(ViewBag.Title)</title>
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />
    @Styles.Render("~/Content/css")
    @Styles.Render("~/Content/login")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/layer")
    @Scripts.Render("~/bundles/common")
    <script type="text/javascript">
        $(function () {
            var timestamp = "@long.MaxValue";
            var responseResult = "@(JSON.Encode(TempData["ResponseResult"]))";
            if ("@(TempData["timestamp"] != null && !string.IsNullOrEmpty(TempData["timestamp"].ToString()))" == "True") {
                timestamp = "@TempData["timestamp"]";
            }
            var timeDiff = (new Date().getTime()) - parseInt(timestamp);
            //小于2.3秒代表是非后退操作 取决于razor视图的渲染速度
            if (timeDiff < 2300 && responseResult != "") {
                var index = layer.load();
                responseResult = JSON.parse(HtmlUtil.htmlDecode(responseResult));
                var msg = responseResult.Message;
                if (!responseResult.Success || msg.indexOf("失败") > 0 || msg.indexOf("错误") > 0 || msg.indexOf("存在") > 0) {
                    layer.alert(HtmlUtil.htmlDecode(msg), { icon: 2 });
                } else {
                    layer.msg(HtmlUtil.htmlDecode(msg), { icon: 6, time: 3000 });
                }
                layer.close(index);
            }
        });
    </script>
</head>
<body>
    <div class="header-container">
        <div class="wrapper">
            <div class="container">
                <div class="position-relative">
                    <div style="width: 400px; height:60px; position: absolute; top: -50px;">
                        <span style=" font-family: YouYuan; font-size: 40px; color: white;">客服中心</span>
                    </div>
                    <div id="login-box" class="login-box visible widget-box ">
                        <div class="widget-body">
                            <div class="widget-main">
                                <img class="margin-b-10" src="/Images/logo.png" />
                                @{
                                    using (Html.BeginForm("Index", "Login", new { ReturnUrl = ViewBag.ReturnUrl, sign = ViewBag.Sign, AppCode = ViewBag.AppCode }, FormMethod.Post, new { @id = "login_form", name = "login_form", style = "padding: 0" }))
                                    {
                                        @Html.AntiForgeryToken()
                                        <span class="block input-icon input-icon-right">
                                            @Html.TextBoxFor(m => m.UserAccount, new { @placeholder = "请输入用户名", @class = "user-login-input form-control", validate = "{required:true,messages:{required:'请输入用户名！'}}" })
                                            <i class="icon-user"></i>
                                        </span>
                                        <span class="block input-icon input-icon-right">
                                            @Html.PasswordFor(m => m.Password, new { @placeholder = "请输入密码", @class = "password-input form-control", validate = "{required:true,messages:{required:'请输入密码！'}}" })
                                            <i class="icon-lock"></i>
                                        </span>
                                        <div class="clearfix">
                                            <button style="cursor: pointer; width: 80%" class="width-35 btn  btn-primary" id="loginSystem" type="submit" value="登录"><i class="icon-key"></i>登录</button>
                                        </div>
                                    }
                                }
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <ul class="bg-bubbles" style="z-index: -1;">
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
            </ul>
        </div>
    </div>
</body>
</html>